package com.smmisia.article.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.smmisia.article.dto.accompany.AccompanyCreateDTO;
import com.smmisia.article.dto.accompany.AccompanyUpdateDTO;
import com.smmisia.article.entity.Accompany;
import com.smmisia.article.response.accompany.AccompanyAuditResponse;
import com.smmisia.article.response.accompany.AccompanyResponse;
import com.smmisia.common.Result.Result;
import jakarta.validation.Valid;

import java.util.List;

/**
* @author smmis
* @description 针对表【accompany(结伴活动表)】的数据库操作Service
* @createDate 2024-12-28 14:11:11
*/
public interface AccompanyService extends IService<Accompany> {

    Result<Long> createAccompany(@Valid AccompanyCreateDTO dto);

    Result<Void> joinAccompany(Long accompanyId);

    Result<Void> auditAccompanyApply(Long memberId, Boolean approved);

    Result<Page<Accompany>> queryAccompanyPage(Integer page, Integer size);

    Result<Page<Accompany>> queryMyJoinedAccompany(Integer page, Integer size);

    Result<Page<Accompany>> queryMyCreatedAccompany(Integer page, Integer size);

    Result updateAccompany(Long id, AccompanyUpdateDTO dto);

    Result deleteAccompany(Long id);

    Result<AccompanyResponse> getAccompanyById(Long id);

    Result<List<AccompanyAuditResponse>> queryAccompanyAuditList(Long id);
}
